public class FindTheOnlyOneTimeNum {
    //a^a=0    a^0=a
    public static int fin(int[] array){
        int ret=0;
        for (int x:array){
            ret^=x;
        }
        return ret;
    }
    public static void main(String[] args) {
        int[] array={1,2,1,5,5};
        System.out.println(fin(array));
    }
}
